/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package domain.Entity;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author jorge
 */
@Entity
@Table(name = "trabajador")
public class EntityTrabajador extends EntityUsuario implements Serializable {
    
    @Column(name = "horas")
    private int horas;
     @Column(name = "minutos")
    private int minutos;
    @ManyToMany
    (targetEntity=domain.Entity.EntityTarea.class, mappedBy = "etr")
    private Collection<EntityTarea> et;
    @OneToMany(targetEntity=domain.Entity.EntityTareaTrabajada.class, mappedBy = "etr")
    private Collection ett;
    @ManyToOne
    private EntityGestor eg;
    
    public EntityTrabajador() {
    }

    public EntityGestor getEg() {
        return eg;
    }

    public void setEg(EntityGestor eg) {
        this.eg = eg;
    }

    public Collection<EntityTarea> getEt() {
        return et;
    }

    public void setEt(Collection<EntityTarea> et) {
        this.et = et;
    }

    public Collection getEtt() {
        return ett;
    }

    public void setEtt(Collection ett) {
        this.ett = ett;
    }

    public int getHoras() {
        return horas;
    }

    public void setHoras(int horas) {
        this.horas = horas;
    }

    public int getMinutos() {
        return minutos;
    }

    public void setMinutos(int minutos) {
        this.minutos = minutos;
    }

    
     

}
